#ifndef __INTERRUPT__
#define __INTERRUPT__

struct cpuState {
    unsigned long   eax;
    unsigned long   ebx;
    unsigned long   ecx;
    unsigned long   edx;
    unsigned long   esi;
    unsigned long   edi;
    unsigned long   ebp;

    unsigned long   intr;
    unsigned long   error;

    unsigned long   eip;
    unsigned long   cs;
    unsigned long   eflags;
    unsigned long   esp;
    unsigned long   ss;
};

extern void intr_stub_0 (void);
extern void intr_stub_1 (void);
extern void intr_stub_2 (void);
extern void intr_stub_3 (void);
extern void intr_stub_4 (void);
extern void intr_stub_5 (void);
extern void intr_stub_6 (void);
extern void intr_stub_7 (void);
extern void intr_stub_8 (void);
extern void intr_stub_9 (void);
extern void intr_stub_10 (void);
extern void intr_stub_11 (void);
extern void intr_stub_12 (void);
extern void intr_stub_13 (void);
extern void intr_stub_14 (void);
extern void intr_stub_15 (void);
extern void intr_stub_16 (void);
extern void intr_stub_17 (void);
extern void intr_stub_18 (void);

extern void mulTask (void);
extern void intr_stub_33 (void);
extern void intr_stub_34 (void);
extern void intr_stub_35 (void);
extern void intr_stub_36 (void);
extern void intr_stub_37 (void);
extern void intr_stub_38 (void);
extern void intr_stub_39 (void);
extern void intr_stub_40 (void);
extern void intr_stub_41 (void);
extern void intr_stub_42 (void);
extern void intr_stub_43 (void);
extern void intr_stub_44 (void);
extern void intr_stub_45 (void);
extern void intr_stub_46 (void);
extern void intr_stub_47 (void);
extern void intr_stub_48 (void);

void handleInterrupt(struct cpuState* cpu);
void installInt(int i, unsigned long long base, unsigned int selektor, int flags);
void initInt(void);
void installInt();

#endif
